import java.util.Arrays;
import java.util.Scanner;

public class pta3 {

	public class Rectangle {
		int width;
		int length;
		public Rectangle(int width,int length){
		this.width=width;
		this.length=length;
		}
		
		public String toString() {
			return "Rectangle [width=" + width + ", length=" + length + "]";
		}
	}
	public static int getPerimeter(Rectangle rectangle){
		return 2*rectangle.length+2*rectangle.width;
	}
	public  static int getArea(Rectangle rectangle){
		return rectangle.length*rectangle.width;
	}
	public class Circle {
		int radius;
		public Circle(int radius){
			this.radius=radius;
		}
		public String toString() {
			return "Circle [radius=" + radius + "]";
		}

	}
	public static int getPerimeter(Circle circle){
		return (int) (2*Math.PI*circle.radius);
	}
	public static int getArea(Circle circle){
		return (int) (Math.PI*circle.radius*circle.radius);
	}
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		pta3.Rectangle[] Rec=new pta3.Rectangle[2];
		Rec[0]=new pta3().new Rectangle(sc.nextInt(),sc.nextInt());
		Rec[1]=new pta3().new Rectangle(sc.nextInt(),sc.nextInt());
		pta3.Circle Cir[]=new pta3.Circle[2];
		Cir[0]=new pta3().new Circle(sc.nextInt());
		Cir[1]=new pta3().new Circle(sc.nextInt());
		System.out.println(getPerimeter(Rec[0])+ getPerimeter(Rec[1])+getPerimeter(Cir[0])+getPerimeter(Cir[1]));
		System.out.println(getArea(Rec[0])+getArea(Rec[1])+getArea(Cir[0])+getArea(Cir[1]));
		System.out.println(Arrays.toString(Rec));
		System.out.println(Arrays.toString(Cir));
	}
}
